package com.loan.util;

import org.springframework.web.context.support.WebApplicationContextUtils;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.Random;

/**
 * @ClassName: ContractNumber
 * @Author: wYin
 * @Date: 2022/1/18 11:25
 */
public class ContractNumber {
    public static String getNumber(){
        Calendar calendar = Calendar.getInstance();
        SimpleDateFormat sim = new SimpleDateFormat("ddHHmmssSS");
        Random random = new Random();
        int i = random.nextInt(100)+99;
        String time = sim.format(new Date());
        String number = "TDYH"+time+i;
        return number;
    }
}
